﻿Namespace db

	Public Class sigc : Inherits table

		Property kimlik As New varchar
		Property adi As New varchar
		Property soyadi As New varchar
		Property pasaport As New varchar
		Property sno As New int
		Property statu As New db.char
		Property isi As New varchar
		Property isyerino As New varchar
		Property murtar As New datetime
		Property islemtar As New datetime
		Property gircik As New db.char
		Property girciktar As New datetime
		Property kaykul As New db.char
		Property calismama As New db.char
		Property rowid As New bigint

		ReadOnly Property isveren As Boolean
			Get
				If IsNull(statu.get) Then Return False
				Select Case statu.get
					Case "01.01.003", "01.01.004" : Return True
					Case "01.11.003", "01.11.004" : Return True
				End Select
			End Get
		End Property

		ReadOnly Property giris As Boolean
			Get
				Return gircik.get = "G"
			End Get
		End Property

		ReadOnly Property cikis As Boolean
			Get
				Return gircik.get = "C"
			End Get
		End Property

		Shared Function open(token As Token, sno As Integer) As List(Of sigc)
			Dim list As New List(Of sigc)
			Dim rs = token.OpenSQL("select * from sigc where sno = @sno", sno)
			Do Until rs.EOF
				Dim sigc As New sigc()
				sigc.row = rs.CurrentRow
				list.Add(sigc)
				rs.MoveNext()
			Loop
			Return list
		End Function

	End Class

End Namespace
